package com.icinfo.cloud.provider.common.annotation;


import com.icinfo.cloud.provider.common.utils.TimeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 描述：时间校验注解
 *
 * @author xiangyuyu
 * @date 2022-02-22 18:32
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = TimeValidator.class)
@Documented
public @interface CheckTime {
    String message() default "日期不合规范（示例：1999-12-12 12:12:12）";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    String format() default "yyyy-MM-dd HH:mm:ss";
}
